﻿Imports System.IO

Public Class BooleanTypeProvider
    Inherits TypeProvider
    Public Overrides ReadOnly Property Types As Type()
        Get
            Return {GetType(Boolean)}
        End Get
    End Property
    Public Overrides Function ReadObject(T As Type) As Object
        Dim b As Boolean = Boolean.Parse(ReadBlock)
        Info.AddCache(b)
        Return b
    End Function
    Public Overrides Sub WriteObject(Obj As Object)
        Info.AddCache(Obj)
        Write(Obj.ToString)
    End Sub
End Class